const express = require("express");
const multer = require('multer');
const app = new express();

app.use(express.static('public'));
app.use(express.urlencoded({ extended: false }));
app.use(multer({ dest: "./public/tmp" }).single("file"));

const LoginRouter = require('./login');
app.use('/Login',LoginRouter);
const CategoryRouter = require('./category');
app.use('/Category',CategoryRouter);
const LabelRouter = require('./Label');
app.use('/Label',LabelRouter);
const ArticleRouter = require('./Article');
app.use('/Article',ArticleRouter);
//监听
app.listen(8081, (err) => {
    if (err) {
        console.log('err', err)
    } else {
        console.log("服务已开启,8081端口");
    }

});